package rtype

import (
	"unsafe"
)

//go:linkname Unsafe_New reflect.unsafe_New
func Unsafe_New(*Rtype) unsafe.Pointer

//go:linkname Unsafe_NewArray reflect.unsafe_NewArray
func Unsafe_NewArray(*Rtype, int) unsafe.Pointer

//go:linkname Chanrecv reflect.chanrecv
func Chanrecv(ch unsafe.Pointer, nb bool, val unsafe.Pointer) (selected, received bool)

//go:linkname Chansend reflect.chansend
func Chansend(ch unsafe.Pointer, val unsafe.Pointer, nb bool) bool

//go:linkname Makechan reflect.makechan
func Makechan(typ *Rtype, size int) (ch unsafe.Pointer)

//go:linkname Makemap reflect.makemap
func Makemap(t *Rtype, cap int) (m unsafe.Pointer)

//go:linkname Mapaccess reflect.mapaccess
func Mapaccess(t *Rtype, m unsafe.Pointer, key unsafe.Pointer) (val unsafe.Pointer)

//go:linkname Mapassign reflect.mapassign
func Mapassign(t *Rtype, m unsafe.Pointer, key, val unsafe.Pointer)

//go:linkname Mapdelete reflect.mapdelete
func Mapdelete(t *Rtype, m unsafe.Pointer, key unsafe.Pointer)

//go:linkname Mapiterinit reflect.mapiterinit
// m escapes into the return value, but the caller of mapiterinit
// doesn't let the return value escape.
func Mapiterinit(t *Rtype, m unsafe.Pointer) unsafe.Pointer

//go:linkname Mapiterkey reflect.mapiterkey
func Mapiterkey(it unsafe.Pointer) (key unsafe.Pointer)

//go:linkname Mapiterelem reflect.mapiterelem
func Mapiterelem(it unsafe.Pointer) (elem unsafe.Pointer)

//go:linkname Mapiternext reflect.mapiternext
func Mapiternext(it unsafe.Pointer)

//go:linkname Maplen reflect.maplen
func Maplen(m unsafe.Pointer) int

//go:linkname Typedmemmove reflect.typedmemmove
func Typedmemmove(t *Rtype, dst, src unsafe.Pointer)
